#pragma once
#include <Windows.h>
class CBaseObject;

class CCamera
{
private:
	CBaseObject* m_pFollowingObject;
	POINT m_CameraOffset;
	RECT m_ViewRect;
	int m_nWidth;
	int m_nHeight;
public:
	CCamera();
	~CCamera();
	void Initialize(int nViewWidth, int nViewHeight, CBaseObject* pObject = NULL);
	void Update(float fDeltaTime);
	void Shutdown();
	void AttachObject(CBaseObject* pObject);
	bool RectOnScreen(RECT& rect);
	inline const POINT& GetCameraOffset() { return m_CameraOffset;}
	inline CBaseObject* GetTargetObject() { return m_pFollowingObject;}
};